import VueRouter from 'vue-router'
import CheckLayout from './check/CheckLayout.vue'
import InputLayout from './check/input/InputLayout.vue'
import PhotoLayout from './check/photo/PhotoLayout.vue'
import SightLayout from './check/sight/SightLayout.vue'
import HearingLayout from './check/hearing/HearingLayout.vue'
import ColorLayout from './check/color/ColorLayout.vue'
import BodyLayout from './check/body/BodyLayout.vue'
import ArmsLayout from './check/arms/ArmsLayout.vue'
import LegsLayout from './check/legs/LegsLayout.vue'
import SubmitLayout from './check/submit/SubmitLayout.vue'
import OtherLayout from './check/other/OtherLayout.vue'
import DeputyLayout from './deputy/DeputyLayout.vue'
 
const routes = [
  { path: '/', redirect: '/admin'  },
  { path: '/admin', name:'Admin', component: () => import('./admin/AdminLayout.vue') ,
    children:[{path:'sys',name:'系统管理', children:[
		{path:'users',name:'用户管理'}
	]}],}, //end admin
  { path: '/home', name:'首页', component: () => import('./home/Home.vue') },  
  { path: '/menu', component: () => import('./Menu.vue') },  
  { path: '/check', name:'体检流程',  component: CheckLayout,
   children:[
	    { path: 'input', name:'信息录入',  component: InputLayout,
			children:[
				//录入信息
				{path:'business-type', name:'选择业务类型',  component: () => import('./check/input/BusinessType.vue')},
				{path:'read-idcard', name:'读取身份证', component: () => import('./check/input/ReadIdCard.vue')},
				{path:'certificate-type', name:'选择证件类型', component: () => import('./check/input/CertificateType.vue')},
				{path:'certificate-info', name:'输入证件信息', component: () => import('./check/input/CertificateInfo.vue')},
				{path:'certificate-confirm', name:'检查身份信息', component: () => import('./check/input/CertificateConfirm.vue')},
				{path:'archive-code', name:'输入档案号', component: () => import('./check/input/ArchiveCode.vue')},
				{path:'school', name:'驾校', component: () => import('./check/input/School.vue')},
				{path:'phone', name:'手机号', component: () => import('./check/input/Phone.vue')},
				{path:'car-type', name:'准驾车型', component: () => import('./check/input/CarType.vue')},
				{path:'promise', name:'承诺书', component: () => import('./check/input/Promise.vue')},
			]
		},
		 
	   { path: 'photo', name:'自助拍照',  component: PhotoLayout,
	   	children:[ 
			{path:'photo-legal', name:'衣着确认', component: () => import('./check/photo/Legal.vue')},
			{path:'photo-lookup', name:'向上看',component: () => import('./check/photo/LookUp.vue')},
			{path:'choose-photo', name:'选择照片',component: () => import('./check/photo/ChoosePhoto.vue')}, 
		]},
	  
		{ path: 'sight', name:'视力检测',  component: SightLayout,
	  	children:[ 
	  			{path:'eyeglasses', name:'佩戴眼镜',component: () => import('./check/sight/EyeGlasses.vue')}, 
				{path:'shelter-left', name:'遮挡左眼',component: () => import('./check/sight/ShelterLeft.vue')},
				{path:'shelter-right', name:'遮挡右眼',component: () => import('./check/sight/ShelterRight.vue')},
				{path:'mark-direction', name:'视标方向',component: () => import('./check/sight/MarkDirection.vue')},
	  	]},
		
		{ path: 'hearing', name:'听力检测',  component: HearingLayout,
		children:[ 
			{path:'wear-aid', name:'佩戴助听器',component: () => import('./check/hearing/WearAid.vue')},
			{path:'sound-direction', name:'声音方向',component: () => import('./check/hearing/SoundDirection.vue')},
		]},
		
		{ path: 'color', name:'辨色力检测',  component: ColorLayout,
		children:[ 
			{path:'image-shape', name:'选择形状',component: () => import('./check/color/ImageShape.vue')}, 
		]},
		
		{ path: 'body', name:'躯干检测',  component: BodyLayout,
		children:[ 
			{path:'body-lookup', name:'向上看',component: () => import('./check/body/LookUp.vue')}, 
		]},
		
		{ path: 'arms', name:'上肢检测',  component: ArmsLayout,
		children:[ 
			{path:'arms-lookup', name:'向上看',component: () => import('./check/arms/LookUp.vue')}, 
		]},
		
		{ path: 'legs', name:'下肢检测',  component: LegsLayout,
		children:[ 
			{path:'height-measure', name:'测量身高',component: () => import('./check/legs/HeightMeasure.vue')}, 
			{path:'left-leg-up', name:'抬起左腿',component: () => import('./check/legs/LeftLegUp.vue')}, 
			{path:'right-leg-up', name:'抬起右腿',component: () => import('./check/legs/RightLegUp.vue')}, 
		]},
		
		{ path: 'submit', name:'信息提交',  component: SubmitLayout,
		children:[ 
			{path:'ills', name:'疾病申告',component: () => import('./check/submit/Ills.vue')},  
		]},
		
		{ path: 'other', name:'其他',  component: OtherLayout,
		children:[ 
			{path:'recheck', name:'复测',component: () => import('./check/other/ReCheck.vue')},  
			{path:'print-photo', name:'打印照片',component: () => import('./check/other/PrintPhoto.vue')},  
			{path:'ai-makeup', name:'美颜',component: () => import('./check/other/AiMakeup.vue')},  
			{path:'pay', name:'支付',  component: () => import('./check/other/Pay.vue') },
			{path:'over', name:'已受理',  component: () => import('./check/other/Over.vue') }
		]},
   ]},  
   
  {path:'/deputy', name:'预览屏', component:DeputyLayout,
	children:[
		{path:'home', name:'预览屏首页', component: () => import('./deputy/DeputyHome.vue')},
		{path:'lookdown', name:'向下看', component: () => import('./deputy/LookDown.vue')},
		{path:'takephoto', name:'拍照',  component: () => import('./deputy/TakePhoto.vue') },
		{path:'face-match', name:'人脸识别',  component: () => import('./deputy/FaceMatch.vue') },
		{path:'face-match-success', name:'人脸识别成功',  component: () => import('./deputy/FaceMatchSuccess.vue') },
		{path:'sight-mark', name:'视标',  component: () => import('./deputy/SightMark.vue') },
		{path:'shelter-left-up', name:'遮住左眼',  component: () => import('./deputy/ShelterLeftUp.vue') },
		{path:'shelter-right-up', name:'遮住右眼',  component: () => import('./deputy/ShelterRightUp.vue') },
		{path:'turn-left', name:'左转头',  component: () => import('./deputy/TurnLeft.vue') },
		{path:'turn-right', name:'右转头',  component: () => import('./deputy/TurnRight.vue') },
		{path:'lift-arms', name:'抬起双臂',  component: () => import('./deputy/LiftArms.vue') },
		{path:'put-hands', name:'放置双手',  component: () => import('./deputy/PutHands.vue') },
		{path:'height-measure-up', name:'测量身高',  component: () => import('./deputy/HeightMeasureUp.vue') },
	]
  }
]

window.routers = routes;

export default routes;
